//引入实例
import { request1 } from "@/utils/http/index"
//类型
import type {
    trademarkListType
} from "@/api/product/model/trademarkType"


//1.请求品牌分页列表
export const requestTrademarkList = (page: number, limit: number) => {
    return request1.get<any, trademarkListType>(`/admin/product/baseTrademark/${page}/${limit}`)
}

//2.新增
export const requestAddTrademark = (logoUrl: string, tmName: string) => {
    return request1.post<any, null>(`/admin/product/baseTrademark/save`, {
        logoUrl,
        tmName,
    })
}

//3.删除
export const requestDeleteTrademark = (id: number) => {
    return request1.delete<any, null>(`/admin/product/baseTrademark/remove/${id}`)
}

//4.修改
export const requestEditTrademark = (id: number, logoUrl: string, tmName: string) => {
    return request1.put<any, null>(`/admin/product/baseTrademark/update`, {
        id,
        logoUrl,
        tmName,
    })
}
